import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
	routes: [{
			path: '/',
			redirect: '/dashboard'
		},
		{
			path: '/',
			component: () => import( /* webpackChunkName: "home" */ '../components/common/Home.vue'),
			meta: {
				title: '自述文件'
			},
			children: [{
					path: '/dashboard',
					component: () => import( /* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
					meta: {
						title: '系统首页'
					}
				},
				{
					path: '/icon',
					component: () => import( /* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
					meta: {
						title: '自定义图标'
					}
				},
				{
					path: '/table',
					component: () => import( /* webpackChunkName: "table" */ '../components/page/BaseTable.vue'),
					meta: {
						title: '基础表格'
					}
				},
				{
					path: '/tabs',
					component: () => import( /* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),
					meta: {
						title: 'tab选项卡'
					}
				},
				{
					path: '/form',
					component: () => import( /* webpackChunkName: "form" */ '../components/page/BaseForm.vue'),
					meta: {
						title: '基本表单'
					}
				},
				{
					// 富文本编辑器组件
					path: '/editor',
					component: () => import( /* webpackChunkName: "editor" */ '../components/page/VueEditor.vue'),
					meta: {
						title: '富文本编辑器'
					}
				},
				{
					// markdown组件
					path: '/markdown',
					component: () => import( /* webpackChunkName: "markdown" */ '../components/page/Markdown.vue'),
					meta: {
						title: 'markdown编辑器'
					}
				},
				{
					// 图片上传组件
					path: '/upload',
					component: () => import( /* webpackChunkName: "upload" */ '../components/page/Upload.vue'),
					meta: {
						title: '文件上传'
					}
				},
				{
					// vue-schart组件
					path: '/charts',
					component: () => import( /* webpackChunkName: "chart" */ '../components/page/BaseCharts.vue'),
					meta: {
						title: 'schart图表'
					}
				},
				{
					// 拖拽列表组件
					path: '/drag',
					component: () => import( /* webpackChunkName: "drag" */ '../components/page/DragList.vue'),
					meta: {
						title: '拖拽列表'
					}
				},
				{
					// 拖拽Dialog组件
					path: '/dialog',
					component: () => import( /* webpackChunkName: "dragdialog" */ '../components/page/DragDialog.vue'),
					meta: {
						title: '拖拽弹框'
					}
				},
				{
					// 国际化组件
					path: '/i18n',
					component: () => import( /* webpackChunkName: "i18n" */ '../components/page/I18n.vue'),
					meta: {
	
						title: '国际化',
					}
				},
				{
					// 权限页面
					path: '/permission',
					component: () => import( /* webpackChunkName: "permission" */ '../components/page/Permission.vue'),
					meta: {
						title: '权限测试',
						permission: true
					}
				},
				{
					path: '/404',
					component: () => import( /* webpackChunkName: "404" */ '../components/page/404.vue'),
					meta: {
						title: '404'
					}
				},
				{
					path: '/403',
					component: () => import( /* webpackChunkName: "403" */ '../components/page/403.vue'),
					meta: {
						title: '403'
					}
				},
				{
					path: '/donate',
					component: () => import( /* webpackChunkName: "donate" */ '../components/page/Donate.vue'),
					meta: {
						title: '支持作者'
					}
				},
				{
					path: '/user',
					component: () => import( /* webpackChunkName: "donate" */ '../components/page1/UserManage.vue'),
					meta: {

						title: '账号管理',
						permission: true
					}
				},
				{
					path: '/insertLevelApplicationform',
					component: () => import( /* webpackChunkName: "donate" */ '../components/page1/LevelApplicationform.vue'),
					meta: {
						title: '提交代理升级请求',
						onlymember:true
					}
				},
				{
					path: '/myLevelApplicationform',
					component: () => import( /* webpackChunkName: "donate" */ '../components/page1/selectLevelAppForm.vue'),
					meta: {

						title: '我的升级请求',
						onlymember:true
					}
				},
				{
					path: '/otherLevelApplicationform',
					component: () => import( /* webpackChunkName: "donate" */ '../components/page1/selectOtherLevelAppForm.vue'),
					meta: {
						title: '收到的代理请求'
					}
				},
				{
					path: '/getMemberMes',
					component: () => import( /* webpackChunkName: "donate" */ '../components/page1/getMemberMes.vue'),
					meta: {
						title: '展示所有用户信息',
						permission: true
					}
				},
				{
					path: '/selectTransactionPriceByMemberid',
					component: () => import( /* webpackChunkName: "donate" */
						'../components/page1/selecttransactionpricebyMemberid.vue'),
					meta: {
						title: '展示用户当月所消费的总额'
					}
				}, {
					path: '/role',
					component: () => import( /* webpackChunkName: "donate" */ '../components/page1/Role.vue'),
					meta: {
						title: '角色管理',
						permission: true
					}
				}, {
					path: '/loginmsg',
					component: () => import( /* webpackChunkName: "donate" */ '../components/page1/LoginMsg.vue'),
					meta: {
						title: '登录日志',
						permission: true
					}
				}, {
					path: '/levelList',
					component: () => import( /* webpackChunkName: "donate" */ '../components/page1/levelList.vue'),
					meta: {
						title: '等级分润明细'
					}
				}, {
					path: '/agent',
					component: () => import('../components/page1/agent.vue'),
					meta: {
		
						title: '代理列表',
						onlymember:true
					}
				}, {
					path: '/advice',
					component: () => import('../components/page1/advice.vue'),
					meta: {
						title: '意见反馈',
					}
				}, {
					path: '/transaction',
					component: () => import('../components/page1/transaction.vue'),
					meta: {
						title: '业绩明细',
						onlymember:true
					}
				},
				{
					path: '/withdraw',
					component: () => import('../components/page1/withDraw.vue'),
					meta: {
						title: '提现',
						onlymember:true
					}
				},
				{
					path:'/banner',
					component: () => import('../components/page1/banner.vue'),
					meta: {title:'Banner轮播图'}
				},
				{
					path: '/bank',
					component: () => import('../components/page1/bank.vue'),
					meta: {
						title: '银行设置',
						permission: true
					}
				},
				{
					path:'/addtransaction',
					component: () => import('../components/page1/addTransaction.vue'),
					meta: {title:'添加订单'}
				},				{
					path: '/addadvice',
					component: () => import('../components/page1/addadvice.vue'),
					meta: {
						title:'新增意见反馈'
									}
				},{
					path: '/newMembers',
					component: () => import('../components/page1/newMembers.vue'),
					meta: {
						title:'新增会员',
						onlymember:true
					}
				},{
					path:'/showBanner',
					component:()=> import('../components/page1/showBanner.vue'),
					meta:{title:'轮播图展示'}
				}
			]
		}, {
			path: '/login',
			component: () => import( /* webpackChunkName: "login" */ '../components/page/Login.vue'),
			meta: {
				title: '登录'
			}
		}, {
			path: '*',
			redirect: '/404'
		}
	]
});